package com.yunkeji.system.domain.bo;

import com.yunkeji.common.core.domain.BaseEntity;
import com.yunkeji.common.core.validate.AddGroup;
import com.yunkeji.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * APP版本信息业务对象 ykj_sys_version
 *
 * @author zhang
 * @date 2024-07-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysVersionBo extends BaseEntity {

    /** 自增索引 */
    @NotNull(
            message = "自增索引不能为空",
            groups = {EditGroup.class})
    private Long versionIndex;

    /** 是否有效 */
    @NotNull(
            message = "是否有效不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private Integer validFlag;

    /** 版本代码 */
    @NotBlank(
            message = "版本代码不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private String versionCode;

    /** 下载地址 */
    @NotBlank(
            message = "下载地址不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private String versionDownloadUrl;

    /** 是否强制更新 */
    @NotNull(
            message = "是否强制更新不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private Integer forceUpdate;

    /** 更新细节 */
    @NotBlank(
            message = "更新细节不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private String updateDetail;

    /** */
    @NotBlank(
            message = "不能为空",
            groups = {AddGroup.class, EditGroup.class})
    private String remark;

    /** 渠道 */
    @NotNull(
        message = "渠道不能为空",
        groups = {AddGroup.class, EditGroup.class})
    private Integer branch;
}
